This invention relates to dynamic control by table look-up, and more particularly to an efficient table look-up method.
In dynamic control applications, look-up tables are commonly utilized to relate one or more measured independent variables to a dependent variable. In vehicle engine controls, for example, a look-up table is customarily used to store fuel injection pulse width as a function of measured engine speed and measured engine load. On a simpler level, look-up tables may be used to convert a sensor measurement to an output in standard units. In any event, dynamic control applications typically require frequent updating of the retrieved information so that the dependent output variable continuously reflects the current value of the independent input variable.
In general, and using a two-dimensional example, a look-up table may be represented by the table of FIG. 2, which stores a number of X,Y data pairs, where X is the independent variable and Y is the dependent variable. The data points are stored in ascending (or descending) order of the independent variable, and the term xe2x80x9cindexxe2x80x9d is used to identify a pair of data points that bracket a measured value (input) of the independent variable (X). For example, an index having a value of 12 is used to bracket an input value that is at least 2000 but less than 2075. The output (Y) value corresponding to the input value is then determined by interpolation.
In conventional practice, a table look-up is carried out by resetting the index to the top (or bottom) of the table (for example, index=0, or index=25), and then successively incrementing (or decrementing) the index until the input value is bracketed by the associated independent variable values. This procedure tends to be overly time consuming, particularly in demanding applications involving many look-up tables and requiring a high throughput. Accordingly, what is needed is a more efficient and faster table look-up method.
The present invention is directed to an improved table look-up method for dynamic control applications, wherein a previous index value is used as a starting point for quickly and efficiently identifying the independent variable values that bracket the input value. At each table look-up request, the input is compared to the independent variable value associated with the last index value from the previous look-up request, and the index is then incremented or decremented from that point to identify the pair of independent variable data points that bracket the input value. In most dynamic control applications, the table is used to update the dependent variable at a fast rate relative to the rate of change of the input value, and the lookup method of this invention provides a significant speed improvement.